﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using Digitalmes.Model.EquipmentManagement;
using Digitalmes.Model;

namespace Digitalmes.ViewModel.EquipmentManagement.EquipmentSpotTableVMs
{
    public partial class EquipmentSpotTableTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._EquipmentSpotTable._Equipment")]
        public ExcelPropety Equipment_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.EquipmentId);
        [Display(Name = "_Model._EquipmentSpotTable._LineId")]
        public ExcelPropety LineId_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.LineId);
        [Display(Name = "_Model._EquipmentSpotTable._LineCode")]
        public ExcelPropety LineCode_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.LineCode);
        [Display(Name = "_Model._EquipmentSpotTable._OpId")]
        public ExcelPropety OpId_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.OpId);
        [Display(Name = "_Model._EquipmentSpotTable._OpCode")]
        public ExcelPropety OpCode_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.OpCode);
        [Display(Name = "_Model._EquipmentSpotTable._UseOperator")]
        public ExcelPropety UseOperator_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.UseOperator);
        [Display(Name = "_Model._EquipmentSpotTable._CreateTime")]
        public ExcelPropety CreateTime_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.CreateTime, true);
        [Display(Name = "_Model._EquipmentSpotTable._UpdateTime")]
        public ExcelPropety UpdateTime_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.UpdateTime, true);
        [Display(Name = "_Model._EquipmentSpotTable._CreateBy")]
        public ExcelPropety CreateBy_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.CreateBy);
        [Display(Name = "_Model._EquipmentSpotTable._UpdateBy")]
        public ExcelPropety UpdateBy_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.UpdateBy);
        [Display(Name = "_Model._EquipmentSpotTable._IsValid")]
        public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.IsValid);
        [Display(Name = "_Model._EquipmentSpotTable._TenantCode")]
        public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<EquipmentSpotTable>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            Equipment_Excel.DataType = ColumnDataType.ComboBox;
            Equipment_Excel.ListItems = DC.Set<Equipment>().GetSelectListItems(Wtm, y => y.TenantCode.ToString());

        }

    }

    public class EquipmentSpotTableImportVM : BaseImportVM<EquipmentSpotTableTemplateVM, EquipmentSpotTable>
    {
            //import

    }

}